<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">

     <script>
	 var arr=[1,2,3,4];
	 arr.length=1;
	 console.log(arr);//1
	 </script>
	</body>
</html>
